home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group98c.txt
/
000141_icon-group-sender _Thu Dec 17 16:31:12 1998.msg
< prev
next >
Wrap
Internet Message Format
|
2000-09-20
|
983b
Return-Path: <icon-group-sender>
Received: (from root@localhost)
by baskerville.CS.Arizona.EDU (8.9.1a/8.9.1) id QAA26207
for icon-group-addresses; Thu, 17 Dec 1998 16:31:06 -0700 (MST)
Message-Id: <199812172331.QAA26207@baskerville.CS.Arizona.EDU>
From: gep2@computek.net
Date: Thu, 17 Dec 1998 14:03:02 -0600 (CST)
Subject: Re: Small Icon programming problem
To: icon-group@optima.CS.Arizona.EDU
Errors-To: icon-group-errors@optima.CS.Arizona.EDU
Status: RO
> Here is a rather straightforward solution to the problem of
sorting digits while preserving the sign of an integer.
Here's another, in SNOBOL4 this time (assuming running under SPITBOL, or that
FULLSCAN is turned on):
DEFINE("DISORT(DISORT)I,J")
DD = "0123456789" :(DISORT_END)
DISORT DISORT ANY(DD) $ I ANY(DD) $ J *GT(I,J) = J I :S(DISORT)F(RETURN)
DISORT_END
Gordon Peterson
http://www.computek.net/public/gep2/
Support the Anti-SPAM Amendment! Join at http://www.cauce.org/